package wifiunion.com.notice.presenter;

import android.content.Context;

import java.util.HashMap;

import wifiunion.com.notice.ConfigureContact;
import wifiunion.com.notice.model.AddConfigureModel;

/**
 * Created by Administrator on 2017/3/7.
 */

public class UpdateNoticeConfigurePresenter implements ConfigureContact.Presenter, ConfigureContact.Callback {
    private ConfigureContact.View mView;
    private Context mContext;
    private AddConfigureModel mModel;

    public UpdateNoticeConfigurePresenter(Context context, ConfigureContact.View view) {
        mView = view;
        mContext = context;
        mModel = new AddConfigureModel();
    }

    @Override
    public void onSuccess(Object data) {
        mView.onUpdateNoticeConfigureSuccess();
    }

    @Override
    public void onServerFailed(Object errorObj) {
        mView.onUpdateNoticeConfigureFailed(errorObj);
    }

    @Override
    public void onNetFailed() {
        mView.onUpdateNoticeConfigureFailed("网络异常");
    }

    @Override
    public void start() {

    }

    @Override
    public void start(HashMap<String, Object> param1s) {
        mModel.updateNoticeConfigue(param1s, this);
    }

}
